home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / share.zip / SHARE.INF < prev   
Text File  |  1991-06-04  |  13KB  |  267 lines

  1.        Downloaded from Data-Link BBS in Baton Rouge, LA. 504-778-0015
  2.        and uploaded here by Bob Goodman...Bob<G>
  3.  
  4.                     DOS 4.01 SHARE Service Question
  5.                     ===============================
  6.  
  7.       (This message I originally sent to a number of local BBS's,
  8.        which I have now slightly edited for clarity.
  9.                                         -Richard Fink  05-Mar-1990)
  10.  
  11.          From: RICHARD FINK
  12.            To: ALL
  13.       Subject: DOS 4.01 SHARE Service Question
  14.  
  15.       Do you remember my 9/10/89 question on this BBS regarding SHARE ?
  16.       Here is the original question followed by what I found out...
  17.  
  18.  
  19.       Tech Question regarding:  DOS 4.01 SHARE
  20.  
  21.       I know the purpose of SHARE in multi-user, multi-tasking and
  22.       network environments.  But MS-DOS 4.01 seems to feel that SHARE
  23.       must be loaded just because a Large-Partition is defined.  It
  24.       may be loaded either via the INSTALL command in the CONFIG.SYS
  25.       file or as a TSR in the AUTOEXEC.BAT file.  But if you have a
  26.       DOS partition over 32 MB's and you don't install SHARE you
  27.       generate a DOS  "WARNING....."  message.  DOS even goes so far
  28.       that if you have not installed SHARE it will search the root
  29.       directory for it and then AUTO-LOAD it !!  Now THAT is a real
  30.       first !  Why...
  31.  
  32.       I ran without it for months on a 100MB partition with absolutely
  33.       no problem.  Then I got afraid of that constant boot-up warning
  34.       and put it back in my CONFIG file.  Of course it is a pain at times
  35.       because it can interfere with reasonable desired file access-
  36.       such as backing up a file that has not been opened with the proper
  37.       Shared Read access by the owning TSR program.  Not that you want to
  38.       actually back that file up but that it causes an error msg and
  39.       requires an operator response to continue.  That's  all fine for
  40.       the original intended purpose of SHARE but now what does it do for
  41.       partitions over 32 MB that is not needed in <32 MB partitions ?
  42.       Anybody know ?
  43.  
  44.       Remember it's NOT required to operate with Large Partitions.  I've
  45.       run for months without it...  what was I missing ?
  46.                                              -Ric
  47.       -----------------------------------
  48.  
  49.  
  50.       Well like so many I made the trek to COMDEX a few weeks ago and
  51.       gave some effort to finding the answer to this profound question
  52.       of life and the need to SHARE.  Microsoft didn't know the answer.
  53.       IBM was staffed by a techie who said "I really don't know the
  54.       answer to that, I just include it too."  So I insisted and persisted
  55.       and made many at the IBM stand feel increasingly squirmy as nobody
  56.       knew the answer.  How stupid they must have felt that somebody
  57.       was here asking a dumb DOS question when "we" all knew it no longer
  58.       mattered...  that OS/2 was now the Real Thing.
  59.  
  60.       THEN one day they gave a freebie day at COMDEX to an original DOS
  61.       programmer who worked on DOS 4.01 !  He quietly and completely
  62.       explained the answer...  It's VERY interesting.
  63.                                     ~~~~
  64.  
  65.       If you use "modern" programs all the time, you may have
  66.       never run into problems using Large-Partitions (over 32MB)
  67.       without SHARE loaded.  But beware...
  68.  
  69.       The deal is that the old file FCB's cannot hold pointer
  70.       information in it's "reserved fields", on files that are
  71.       located on disk locations past 32MB's.  When used in a
  72.       Large-Partition environment, FCB's can be okay as long as
  73.       the file is physically WITHIN the 32MB range of the partition.
  74.       However if part of the file is past the 32MB range, say in
  75.       the 38th megabyte area of the partition, the FCB doesn't
  76.       chuck-up or give an error, it just rolls the pointer value
  77.       over, thru zero, and gives DOS a new garbage value as an
  78.       internal disk pointer.  The next disk read gives junk to
  79.       your program, the next disk write corrupts your disk.
  80.       It's Great Fun.
  81.  
  82.       The reason SHARE is the solution is because it was already
  83.       doing the required fix for a different reason in small
  84.       partitions.  To give file sharing protection in multi-user
  85.       environments SHARE would make a copy of a program's FCB in
  86.       a new local copy within SHARE and perform the file open from
  87.       SHARE's copy of the FCB.  In so doing, it technically owned
  88.       the file and could effectively perform traffic-cop duty
  89.       regarding multi-access activity on the file.
  90.  
  91.       Since old programs using hard coded FCB's had to be given a
  92.       way to run in Large-Partitions something had to be done to
  93.       the FCB disk pointer problem.  The solution was to copy the
  94.       original FCB from within the program to a new "extended" format
  95.       of the FCB that would be in control by the operating system.
  96.       The extended form of the FCB with larger fields would be able
  97.       to support Large-Partitions, and any other extensions in the
  98.       future.
  99.  
  100.       This FCB copy capability was already in existence in the
  101.       current SHARE facility.  SHARE was just upgraded to not just
  102.       copy the FCB into it's own area for file access control but to
  103.       copy it into an extended FCB format, when applicable, for
  104.       Large-Partition access.
  105.  
  106.       As nobody knows the internal code of the program's they run
  107.       everyday, you can never be positive if a program is using File
  108.       Handles via Extended File IO or old FCB's.  (Actually, if you
  109.       can specify a path, it's 99.44% likely to be extended file IO
  110.       using a File Handle.)  Since the use of FCB's in Large-partitions,
  111.       when accessing the disk area past 32 MB will corrupt the poor
  112.       user's disk, IBM said:  "this is serious",  and even forced the
  113.       bootup process to automatically search for SHARE in the root
  114.       directory if it had not been explicitly loaded in the config file.
  115.  
  116.       Ahhhh.... and that explains why such "modern" people as myself
  117.       who had used only "modern" programs with File Handles (no FCB's)
  118.       never had any problems.
  119.       Right.  But not completely safe.
  120.  
  121.       Just lucky.  The reason SHARE is an ABSOLUTE NECESSITY in systems
  122.       using Large-Partitions is this:
  123.  
  124.            My IBM DOS programmer says that even today DOS itself still
  125.            uses some old FCB's internally for some unspecified internal
  126.            disk functions !
  127.  
  128.            God help us, Microsoft sure didn't.
  129.  
  130.            DOS still runs some original DOS 1.1 file access code that
  131.            REQUIRES SHARE in order not to, on some day, wipe out your
  132.            hard disk !!!
  133.  
  134.       So if you're getting the SHARE WARNING at bootup friends, stick
  135.       it back in your config file, or just put it in the root directory
  136.       of you're C drive, and just eat the bytes it takes in memory...
  137.       Fact is, we've got no choice.
  138.                                      -Ric
  139.  
  140.       -------------------------------------------------------------------
  141.       Copyright (C) 1990 RainTree Computer Systems.
  142.       Permission granted to electronically distribute in unmodified form.
  143.       Permission granted to publish with the requirement that a copy of
  144.       the final publication be sent to the holder of the copyright:
  145.         RainTree Computer Systems
  146.         P.O Box 2339
  147.         Mill Valley, CA 94941
  148.  
  149.       ===================================================================
  150.  
  151.       P.S.  DOS 4 will load SHARE automatically in the following cases:
  152.  
  153.              1) if SHARE.EXE is in the same directory as specified for
  154.                 COMMAND.COM in the SHELL= line in the CONFIG.SYS.
  155.  
  156.                 For example, if you put all of your DOS files in the
  157.                 C:\DOS directory, then the following line in CONFIG.SYS
  158.                 will allow DOS 4 to load SHARE automatically:
  159.  
  160.                        SHELL=C:\DOS\COMMAND.COM /P /E:512
  161.  
  162.           or 2) if SHELL= is not specified in the CONFIG.SYS and SHARE.EXE
  163.                 is in the root directory.
  164.  
  165.  -----------------------------------------------------------------------
  166.  Addendum:
  167.  -----------------------------------------------------------------------
  168.  IBM PC RoundTable
  169. Category 5,  Topic 17
  170. Message 1         Wed Nov 14, 1990
  171. S.LUPPESCU                   (Forwarded) 
  172.  
  173. This is a continuation of the topic summary: I didn't get the message when I
  174. put SHARE.COM in the root directory where DOS could find it when I booted up,
  175. and didn't get the message any more, but I couldn't detect any change in the
  176. behavior of the computer except for the fact that SHARE was eating up about 7K
  177. of memory. Does anyone know what SHARE does, why it is necessary, if it is OK
  178. not to load it and save 7K? Thanks.
  179. ----------
  180. IBM PC RoundTable
  181. Category 5,  Topic 17
  182. Message 5         Sun Nov 18, 1990
  183. C.JONES13 [Craig]            at 01:21 PST
  184.  
  185. S.LUPPESCU,
  186.  
  187. The one thing that that zip file doesn't cover is that there is a difference
  188. between explicitly loading SHARE (either via CONFIG.SYS or AUTOEXEC.BAT) and
  189. letting DOS load it automatically (as you are doing). When you explicitly load
  190. SHARE, 3 (or is it 4?) functions are invoked: File locking (sharing), support
  191. for partitions greater than 32MB, and prevention of switching floppies with
  192. open files. When DOS loads SHARE by itself, then only one of these functions
  193. is actually invoked (>32MB support).
  194.  
  195. I run many programs that don't bother closing files on the floppy. So, it's
  196. important to me that SHARE not check for that. Therefore, I let DOS load SHARE
  197. by itself. Unfortunately, I also occasionally need to run Paradox in 2
  198. DesqView windows at the same time--to test network applications, so file
  199. locking would be nice.  (Can you say "damned if you do, damned if you don't?")
  200. At least, it turns out that even after DOS loads SHARE automatically (with the
  201. one function invoked), you can turn on the rest of the functions by loading
  202. SHARE (again) as a command.
  203.  
  204. 8---m   Craig   8---m  8---m
  205.  
  206.  
  207.  
  208. ----------
  209. IBM PC RoundTable
  210. Category 5,  Topic 17
  211. Message 6         Sun Nov 18, 1990
  212. NJUDELL [Neil]               at 16:16 EST
  213.  
  214. Craig, there is an undocumented feature in share.  If you load it explicitly
  215. via install, you can disable the file sharing features by entering the command
  216. share/nc, and then re-enable it via the command share.  Neat, eh?
  217. ----------
  218. IBM PC RoundTable
  219. Category 5,  Topic 17
  220. Message 7         Mon Nov 19, 1990
  221. C.JONES13 [Craig]            at 23:28 PST
  222.  
  223. Neil,
  224.  
  225. How's that again?  As I read you, I would first install SHARE explicitly via
  226. CONFIG.SYS (INSTALL=SHARE.COM).  This turns on all of the functions of SHARE. 
  227. Then, whenever I want to turn off the file sharing, I'd issue:
  228.                                 SHARE /NC
  229.  To turn it back on:
  230.                                 SHARE
  231.  
  232. Questions: (1) Will this also work if SHARE is installed via AUTOEXEC.BAT? 
  233. (2) How about if via LOADHI (DesqView)?  (3) Does it also turn off diskette
  234. change detection?  (4) What does /NC stand for?
  235.  
  236. Thank You,
  237.  
  238. 8---m   Craig   8---m  8---m
  239.  
  240. ----------
  241. IBM PC RoundTable
  242. Category 5,  Topic 17
  243. Message 8         Tue Nov 20, 1990
  244. NJUDELL [Neil]               at 08:27 EST
  245.  
  246. Craig, I have determined this experimentally.  In my config.sys, I install
  247. SHARE.EXE (NOTE:  NOT share.com - I have not heard of share.com) in high
  248. memory under QEMM via install=loadhi..., and then in the autoexec.bat turn off
  249. file sharing via share/nc.  I then can re-enable file sharing via share.  In
  250. this manner, all my FCB-based software such as SideKick+ works just fine and
  251. dandy, and I don't end up with share violations.  It appears to have no effect
  252. on the change line for the floppy drives, which works just fine.  I have used
  253. this for both MS-DOS4.0 and MS-DOS4.01 large partitions.  The /NC switch is,
  254. of course, undocumented, like many (most?) of the useful things Microsoft
  255. does.  Experimentally, the /NC switch is what DOS does if you allow it to
  256. autoload share (meaning that it is in the root directory of the boot drive, or
  257. the drive/path where the SHELL is located).  However, share does not appear to
  258. recognize the /NC switch if it is applied in the INSTALL= statement, and so I
  259. apply the switch after the INSTALL= by putting c:\share /NC into my
  260. autoexec.bat.  Using loadhi /TSR in the config.sys causes about 90 bytes or so
  261. of low RAM to be used up.  If you want to avoid even THAT low amount of low
  262. RAM usage, and you don't mind seeing a warning message, you can eliminate the
  263. /TSR from the INSTALL=loadhi... line, or you can move share.exe out from both
  264. the root and the directory where your SHELL is located, and simply install it
  265. from the autoexec.bat, using loadhi and the /NC switch.
  266. ----------
  267.